package str;

import java.util.Arrays;

/**
 * leet-code(541) 反转字符串
 *
 * @author Ringo
 * @date 2021/8/20 22:42
 */
public class ReverseStr {
    public String reverseStr(String s, int k) {
        char[] chars = s.toCharArray();
        int n = chars.length;
        int step = 2 * k;
        int p = 0;
        int count = 0;

        return null;
    }

    public static void main(String[] args) {
        char[] a = {'a', 'b', 'c'};
        reverse(a, 0, a.length);
        System.out.println(Arrays.toString(a));
    }

    private static void reverse(char[] a, int start, int end) {
        int lo = start, hi = end - 1;
        while (lo < hi) {
            char temp = a[lo];
            a[lo] = a[hi];
            a[hi] = temp;
            ++lo;
            --hi;
        }
    }
}
